.TH std::jthread::~jthread 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::jthread::~jthread \- std::jthread::~jthread

.SH Synopsis
   ~jthread();  \fI(since C++20)\fP

   Destroys the jthread object.

   If *this has an associated thread (joinable() == true), calls request_stop() and
   then join().

.SH Notes

   The request_stop() has no effect if the jthread was previously requested to stop.

   A jthread object does not have an associated thread after

     * it was default-constructed.
     * it was moved from.
     * join() has been called.
     * detach() has been called.

   If join() throws an exception (e.g. because deadlock is detected), std::terminate()
   may be called.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

                destructs the thread object, underlying thread must be joined or
   destructor   detached
                \fI(public member function of std::thread)\fP

.SH Category:
     * Todo no example
